

source_dir="openssl-1.0.1j"
if [ ! -d "$source_dir" ]; then
	git clone https://git.oschina.net/wr4ng1er/openssl-1.0.1j.git
else
	echo $source_dir
fi 

cd $source_dir
./config
./Configure --prefix=/opt/openssl
make && make install

echo '/opt/openssl/lib' >> /etc/ld.so.conf.d/openssl.conf
echo '/opt/openssl/include' >> /etc/ld.so.conf.d/openssl.conf


echo 'export PATH=$PATH:/usr/local/openssl/bin'>>/etc/profile && source /etc/profile


